import axios from 'axios'
import Vue from 'vue'

axios.defaults.baseURL = 'http://wanghongde.top:8888/api/private/v1/'
axios.interceptors.request.use(function (config) {
  const token = sessionStorage.getItem('token')
  config.headers.Authorization = token
  return config
})

Vue.prototype.$http = axios
